package method;

public class Demo2 {
    public static void main(String[] args) {
        int max=max(10,10);
        System.out.println(max);

    }
    //比大小
    public static int max(int number1,int number2){
        int result=0;
        if (number1==number2){
            System.out.println("num1=num2");
            return 0;
        }

        if(number1>number2){
            result=number1;
        }else {
            result=number2;
        }

        return result;//除了返回值，还可以结束方法
    }
}
